package com.linshengjian.snowball.guard.handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface IVerifyCodeHandle {

    /**
     * 验证码正确返回
     * @return
     */
    void validateSuccess(HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 验证码错误返回
     * @return
     */
    void validateError(HttpServletRequest request, HttpServletResponse response, Exception e) throws IOException;

    /**
     * 验证码发送成功
     * @return
     */
    void sendSuccess(HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 验证码发送失败
     * @return
     */
    void sendError(HttpServletRequest request, HttpServletResponse response, Exception e) throws IOException;
}
